// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import VueCookies from 'vue-cookies'
import App from './App'
import router from './router'
import Raven from 'raven-js'
import variable from '@/common/variable'
import RavenVue from 'raven-js/plugins/vue'
import FastClick from 'fastclick'
import axios from 'axios'
// import './libs/rem'
import './libs/mintui'
import './common/pre'
import './components'
import './assets/less/reset.less'
import './assets/less/common.less'
//引入webfont基础样式
import './assets/less/iconfont.less'

import './themes/default.less'
import './themes/worldcup.less'

FastClick.attach(document.body);

Vue.config.productionTip = false

//项目错误上报bugsnag
//https://sentry.io/wujing/vue-worldcup/getting-started/javascript-vue/
if (!window.app.isDebug) {
  Raven
  .config('https://65fa3a83ffbe4e9fb0ad8f6a881e7d62@sentry.io/1212800')
  .addPlugin(RavenVue, Vue)
  .install();
}

//配置axios根路径
axios.defaults.baseURL = variable.BASE_API;

//引入常量
Vue.prototype.variable = variable;

Vue.use(VueCookies);

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
